void main() {
  // 1. number与string转换
  String str = '123';

  //类型.parse()
  var n = int.parse(str);
  var n2 = double.parse(str);
  print(n);
  print(n2);

  //is方法来判断类型
  print(n is int);

  var n3 = 456;
  //toSting() 转换成字符串
  print(n3.toString());

  //isEmpty判断字符串是为空
  var s = "";
  if (s.isEmpty) {
    print('s为空');
  }

  //isNaN
  var m = 0/0;
  if(m.isNaN) {
    print("isNaN");
  }
}
